﻿using System;
using System.Collections.Generic;
using System.Text;
using Model.RF.TestRecord;
using IDAL.RF.TestRecord;

namespace BLL.RF.TestRecord
{
    public class Test_Record : BaseService<Test_RecordInfo>
    {
        private static readonly ITest_Record dal = DALFactory.DataAccess.CreateTest_Record();
        
        public override void SetCurrentRepository()
        {
            CurrentRepository = dal;
        }

        //----------------------------------以下为灵敏度测试相关---------------------------------------------------------
        public int Test_Record_Insert_Sensitivity(Test_RecordInfo tri)
        {
            return dal.Test_Record_Insert_Sensitivity(tri);
        }

        public IList<Test_RecordInfo> Test_Record_GetSensitivity_bySN(string productSN)
        {
            return dal.Test_Record_GetSensitivity_bySN(productSN);
        }

        public IList<Test_RecordInfo> Test_Record_GetSensitivity_byDT(DateTime startTime, DateTime stopTime)
        {
            return dal.Test_Record_GetSensitivity_byDT(startTime, stopTime);
        }

        //----------------------------------以下为OIP3测试相关---------------------------------------------------------
        public int Test_Record_Insert_OIP3(Test_RecordInfo tri)
        {
            return dal.Test_Record_Insert_OIP3(tri);
        }
        
        public IList<Test_RecordInfo> Test_Record_GetOIP3_bySN(string productSN)
        {
            return dal.Test_Record_GetOIP3_bySN(productSN);
        }

        public IList<Test_RecordInfo> Test_Record_GetOIP3_byDT(DateTime startTime, DateTime stopTime)
        {
            return dal.Test_Record_GetOIP3_byDT(startTime, stopTime);
        }

        //----------------------------------以下为电压测试相关---------------------------------------------------------
        public int Test_Record_Insert_VoltageCheck(Test_RecordInfo tri)
        {
            return dal.Test_Record_Insert_VoltageCheck(tri);
        }

        public IList<Test_RecordInfo> Test_Record_GetVoltageCheck_bySN(string productSN)
        {
            return dal.Test_Record_GetVoltageCheck_bySN(productSN);
        }

        public IList<Test_RecordInfo> Test_Record_GetVoltageCheck_byDT(DateTime startTime, DateTime stopTime)
        {
            return dal.Test_Record_GetVoltageCheck_byDT(startTime, stopTime);
        }

        //----------------------------------以下为电流测试相关---------------------------------------------------------
        public int Test_Record_Insert_CurrentCheck(Test_RecordInfo tri)
        {
            return dal.Test_Record_Insert_CurrentCheck(tri);
        }

        public IList<Test_RecordInfo> Test_Record_GetCurrentCheck_bySN(string productSN)
        {
            return dal.Test_Record_GetCurrentCheck_bySN(productSN);
        }

        public IList<Test_RecordInfo> Test_Record_GetCurrentCheck_byDT(DateTime startTime, DateTime stopTime)
        {
            return dal.Test_Record_GetCurrentCheck_byDT(startTime, stopTime);
        }
    }
}
